package com.sip.stream.adapter

import android.content.Context
import com.sip.stream.R
import com.sip.stream.utils.select.OnSelectDialogListener
import xyz.zpayh.adapter.BaseAdapter
import xyz.zpayh.adapter.BaseViewHolder

class SelectItemDialogAdapter(var context: Context,var listener: OnSelectDialogListener): BaseAdapter<String>() {


    override fun getLayoutRes(index: Int): Int {
        return R.layout.select_config_item_layout
    }

    override fun bind(holder: BaseViewHolder, layoutRes: Int) {
    }

    override fun convert(holder: BaseViewHolder, data: String, index: Int) {
        holder.findText(R.id.msgTv).text = data
        holder.findText(R.id.msgTv).setOnClickListener {
            listener.onSelectItemBean(data)
        }
    }
}